<include file="public:header" />
<div class="allpagetop">标签管理<strong>/</strong>标签分类</div>
<div class="admin_main_nr_dbox">
 	    <div class="pagetit">
	        <div class="ptit">标签</div>
				<div class="topnav">
			         
					  <a href="{:RU('tag/lists')}" <if condition="ACTION_NAME eq 'lists'">class="select"</if>>列表</a>
					   <a href="{:RU('tag/add')}" <if condition="ACTION_NAME eq 'add'">class="select"</if>>添加</a>
					   
					     <a href="{:RU('tag/cat')}" <if condition="ACTION_NAME eq 'cat'">class="select"</if>>分类</a>
				    <div class="clear"></div>
				</div>
	        <div class="clear"></div>
	    </div>
		
  
    <form id="form1" name="form1" method="post" action="{:RU('tag/cat_save')}">
	
	  <div class="admin_list_th">
	    <div class="td1" style=" width:50%;"> 
		  <div class="left_txt_td">分类名称</div>
		</div>
		<div class="td4" style=" width:40%;">分类排序</div>		
		<div class="td5" style=" width:10%;">  <div class="admin_list_right">操作</div></div>
	  <div class="clear"></div>
	  </div>
	  
	  
	    <volist name="cat" id="list">
					   <div class="admin_list_tr link_bk">
						<div class="td1" style=" width:50%;">
							  <div class="left_txt_td striking">
							  <input name="id[]" type="hidden" value="{$list.id}" />
									<input name="title[]" type="text"  class="input_text_default small" maxlength="100" value="{$list.title}"/>
							  </div>
						</div>
					 
						<div class="td4" style=" width:40%;">
						<input name="sort[]" type="text"  class="input_text_default small" maxlength="100" value="{$list.sort}"  />
						</div>
						 
						<div class="td5 edit" style=" width:10%;">
						<div class="admin_list_right link_blue">
						<a class="gray" href="{:RU('tag/cat_delete',array('id'=>$list['id']))}" onclick="return confirm('你确定要删除吗？')">删除</a>
									  </div>
						</div>
					  <div class="clear"></div>
					  </div>
	   </volist>
	  
	 <div id="J_add_show_div"></div>
	  
      

  
  
    <div class="admin_list_tr">
						<div class="td1" style=" width:60%;">
								<div class="category_list_add" id="J_category_add">添加分类</div>
						</div>	 
				 
					 	<div class="clear"></div>
	</div>
	
	
	
	<div class="admin_list_foot">
			  <div class="btnbox">
			 	 <input type="submit"  class="admin_submit"   value="保存"/>
				 
			 
			  </div>
			  
			  
			  
	          
	</div>
	  </form>
  
</div>
<include file="public:footer" />
<script type="text/javascript">
$(document).ready(function(){

function get_add_html()
{
	var html='';
	html+="<div class=\"admin_list_tr link_bk\">";
	html+="<div class=\"td1\" style=\" width:50%;\">";
	html+="<div class=\"left_txt_td \">";
	html+="<input name=\"add_title[]\" type=\"text\"  class=\"input_text_default small\" value=\"未命名\" />";
	html+="</div>";
	html+="</div>";
	html+="<div class=\"td2\" style=\" width:40%;\">";
	html+="<input name=\"add_sort[]\" type=\"text\"  class=\"input_text_default small\" value=\"0\"/>";
	html+="</div>";
	html+="<div class=\"td3\" style=\" width:10%;\">";
	html+="</div>";
	html+="<div class=\"clear\"></div>";
	html+="</div>";
	return html;
}
//添加顶级分类
$("#J_category_add").live('click',function()
{
	html=get_add_html();
	$("#J_add_show_div").before(html);
});
 
 
 

 
});
</script>
</body>
</html>